package com.troll.wanandroid.adapter.home

import android.text.Html
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.troll.eth.ex.removeAllBank
import com.troll.wanandroid.R
import com.troll.wanandroid.model.QuestionList

/**
 *
 * @Author:   TangPeng
 * @Time:     6/10/2
 * @Remark:
 */
class QuestionAdapter : BaseQuickAdapter<QuestionList, BaseViewHolder>(R.layout.layout_question) {
    override fun convert(holder: BaseViewHolder, item: QuestionList) {

        holder.setText(R.id.question_tv_author, item.author)
            .setText(R.id.question_tv_desc, Html.fromHtml(item.desc).toString().removeAllBank(2))
            .setText(R.id.question_tv_title, item.title)

    }
}